#!/bin/bash
 
# Author:        zipxing@hotmail.com
# Created:       2015年04月08日 星期三 09时19分55秒
# FileName:      start.sh
# 
SHELL_PATH=`dirname $(readlink -f $0)`
PROJECT_PATH=$SHELL_PATH"/../"
FREETIME_PATH=$SHELL_PATH"/../../"
export PYTHONPATH=$FREETIME_PATH
export FREETIME_PROJECT_PATH=$PROJECT_PATH
PYPY="pypy"
LOCALIP="127.0.0.1"
REDIS_PORT="6379"
killall -9 $PYPY
cd $PROJECT_PATH 
cd conf
$PYPY json2redis.py
cd ..
rm -fr log/*
$PYPY run.py CO01 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py CO02 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py LO01 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py LO02 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py GA01 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py GA02 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py AG01 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py AG02 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py AG03 $LOCALIP $REDIS_PORT 0 &
$PYPY run.py AG04 $LOCALIP $REDIS_PORT 0 &
sleep 5
cd script
$PYPY udpcli.py $LOCALIP 5000 1 100 0.5
